yamada-ui / yamada-ui

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion.
https://yamada-ui.com
MIT License
810 stars 216 forks source link

If a theme is applied, use the theme's token in the `CloseButton` component #1083

Closed hirotomoyamada closed 7 months ago

hirotomoyamada commented 7 months ago

Which package has an issue?

@yamada-ui/react

Package Version

1.3.0

Description

Currently, styling values in components ignore theme tokens. If a theme is applied, you should use the theme's token.

Yamada UI's style system provides fallback functions. If the value of the token in the first argument does not exist, it returns the second argument, the fallback value.

position: "relative",
overflow: "hidden",
outline: 0,
display: "flex",
justifyContent: "center",
alignItems: "center",
flexShrink: 0,
...styles,
...__css,
- ...(isRounded ? { borderRadius: "9999px" } : {}),
+ ...(isRounded ? { borderRadius: "fallback(full, 9999px)" } : {}),

Link to Reproduction

No response

Steps to Reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Browser

None

Operating System

Do you know how to fix the issue?

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix?

None

Additional Information

No response

Hinata0607 commented 7 months ago

I want to try it !!

hirotomoyamada commented 7 months ago

@Hinata0607

Hi, thanks fot the comment!

Yes, please.