Skip to content

Commit 2badcfb

Browse files
committed
Add async option
1 parent 171e358 commit 2badcfb

File tree

3 files changed

+190
-199
lines changed

3 files changed

+190
-199
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sanity-plugin-color-list",
3-
"version": "2.0.3-beta.0",
3+
"version": "2.0.2",
44
"description": "A custom input component for displaying an array of color to pick from.",
55
"main": "build/index.js",
66
"scripts": {

src/components/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import styled, { css } from 'styled-components'
1+
import styled, {css} from 'styled-components'
22
import React from 'react'
3-
import { Tooltip, Box, Text } from '@sanity/ui'
3+
import {Tooltip, Box, Text} from '@sanity/ui'
44

55
export const List = styled.ul`
66
padding: 0;
@@ -11,7 +11,7 @@ export const List = styled.ul`
1111
1212
${props => {
1313
if (props.hasError) {
14-
const { color } = props?.theme?.sanity || {}
14+
const {color} = props?.theme?.sanity || {}
1515
return css`
1616
border-left: 2px solid ${color.solid.critical.enabled.border};
1717
padding-left: 15px;
@@ -24,7 +24,7 @@ export const List = styled.ul`
2424
export const ListItem = styled.li`
2525
display: inline-block;
2626
margin-right: 10px;
27-
border-radius: ${props => props.radius};
27+
border-radius: 100%;
2828
box-sizing: border-box;
2929
position: relative;
3030
height: 38px;
@@ -101,7 +101,7 @@ export const Color = styled.input`
101101
border-radius: ${props => props.radius};
102102
103103
${props => {
104-
const { color } = props?.theme?.sanity || {}
104+
const {color} = props?.theme?.sanity || {}
105105
return css`
106106
box-shadow: 0px 0px 0px 2px ${color.base.focusRing};
107107
`
@@ -119,7 +119,7 @@ export const Color = styled.input`
119119
`}
120120
`
121121

122-
export const ConditionalWrapper = ({ condition, wrapper, children }) => {
122+
export const ConditionalWrapper = ({condition, wrapper, children}) => {
123123
if (condition) {
124124
return wrapper(children)
125125
}

0 commit comments

Comments
 (0)