4
0
forked from crowetic/commerce

Utilities to handle Colors

This commit is contained in:
Belen Curcio 2020-10-19 16:53:02 -03:00
parent 707f814244
commit e2dd854f10
2 changed files with 1 additions and 1 deletions

View File

@ -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'

View File

@ -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) {