Skip to content

Commit

Permalink
fix: sprinkles type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Apr 25, 2024
1 parent 76f8bcb commit eaa4738
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/styles/rainbow-sprinkles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ const responsiveProperties = defineProperties({
wordBreak: true,
overflowWrap: true,
fill: true,
outline: true,
overflow: true,
overflowX: true,
overflowY: true,
Expand Down
37 changes: 14 additions & 23 deletions src/ui/noble/noble-button.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,6 @@ export default function NobleButton(props: NobleButtonProps) {

return otherProps;
},
get baseButtonStyles(): Sprinkles {
return {
fontFamily: "$body",
cursor: "pointer",
appearance: "none",
border: "none",
position: "relative",
userSelect: "none",
whiteSpace: "nowrap",
verticalAlign: "middle",
lineHeight: 1.2,
transitionProperty:
"background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter",
transitionDuration: "200ms",
display: "flex",
justifyContent: "center",
alignItems: "center",
};
},
get variantStyles() {
const variantStylesMap: Record<NobleButtonVariant, BoxProps> = {
solid: {
Expand Down Expand Up @@ -120,10 +101,7 @@ export default function NobleButton(props: NobleButtonProps) {
},
};

return {
...state.baseButtonStyles,
...variantStylesMap[props.variant],
};
return variantStylesMap[props.variant];
},
getDisabledStyles() {
const isLightTheme = state.theme === "light";
Expand Down Expand Up @@ -216,7 +194,20 @@ export default function NobleButton(props: NobleButtonProps) {
return (
<Box
as="button"
position="relative"
fontFamily="$body"
cursor="pointer"
appearance="none"
border="none"
userSelect="none"
whiteSpace="nowrap"
verticalAlign="middle"
lineHeight="1.2"
transitionProperty="background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter"
transitionDuration="200ms"
display="flex"
justifyContent="center"
alignItems="center"
{...state.variantStyles}
{...state.buttonProps}
{...props.attributes}
Expand Down

0 comments on commit eaa4738

Please sign in to comment.