Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[joy-ui][Theme] Components use radius 'sm' irrespective of their own size. #41764

Open
cjmconie opened this issue Apr 3, 2024 · 0 comments
Open
Assignees
Labels
customization: theme Centered around the theming features package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@cjmconie
Copy link

cjmconie commented Apr 3, 2024

Steps to reproduce

Link to live example: https://stackblitz.com/edit/github-9jgg4d?file=src%2Findex.tsx

Steps:

  1. Inspect each of the size variants of the components button and input.
  2. Notice all components have a radius of 0px irrespective of their own size. This is the value of the 'sm' prop in the theme's radius object. var(--joy-radius-sm)

Current behavior

Components like button, input, etc. all use theme radius 'sm' irrespective of their own size ('sm', 'md', 'lg').

Expected behavior

Components like button, input, etc. should (I think) use the theme's size radius appropriate for their own size. E.g <Button size='lg'> would use theme radius 'lg' as its radius.

At least, that's my assumption of how theme radius works 🙈

Context

Use the JoyUI theme object to theme my app.
Specifically here, to set the radius property for each size variant once (in the theme radius object) and have it apply to all components without the need to provide radius style override for components individually.

Theme Radius

Your environment

npx @mui/envinfo
System:
    OS: macOS 14.3
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 123.0.6312.106
    Edge: Not Found
    Safari: 17.3
  npmPackages:
    @emotion/react: ^11.11.3 => 11.11.4 
    @emotion/styled: ^11.11.0 => 11.11.5 
    @mui/base:  5.0.0-beta.40 
    @mui/core-downloads-tracker:  5.15.14 
    @mui/icons-material: ^5.15.14 => 5.15.14 
    @mui/joy: ^5.0.0-beta.32 => 5.0.0-beta.32 
    @mui/material: ^5.15.14 => 5.15.14 
    @mui/private-theming:  5.15.14 
    @mui/styled-engine:  5.15.14 
    @mui/system:  5.15.14 
    @mui/types:  7.2.14 
    @mui/utils:  5.15.14 
    @mui/x-date-pickers: ^6.19.0 => 6.19.8 
    @types/react: ^18.2.74 => 18.2.74 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript:  5.4.3 

Search keywords: joy-ui radius theme

@cjmconie cjmconie added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 3, 2024
@danilo-leal danilo-leal added package: joy-ui Specific to @mui/joy customization: theme Centered around the theming features labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants