forked from crowetic/commerce
Utilities to handle Colors
This commit is contained in:
parent
707f814244
commit
e2dd854f10
@ -1,7 +1,6 @@
|
||||
import { NextSeo } from 'next-seo'
|
||||
import { FC, useState } from 'react'
|
||||
import s from './ProductView.module.css'
|
||||
import { Colors } from '@components/ui/types'
|
||||
import { useUI } from '@components/ui/context'
|
||||
import { Button, Container } from '@components/ui'
|
||||
import { Swatch, ProductSlider } from '@components/product'
|
||||
|
@ -16,6 +16,7 @@ export function getRandomPairOfColors() {
|
||||
}
|
||||
|
||||
function hexToRgb(hex: string = '') {
|
||||
// @ts-ignore
|
||||
const match = hex.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i)
|
||||
|
||||
if (!match) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user