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

[Request] Add variable accent to color enum #33

Closed
trebitowski opened this issue Aug 18, 2023 · 2 comments
Closed

[Request] Add variable accent to color enum #33

trebitowski opened this issue Aug 18, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists request New feature or request

Comments

@trebitowski
Copy link

trebitowski commented Aug 18, 2023

If a parent component has a color set, it is inherited by the children. This is useful in most cases, but I've found a few times I wanted to reset the component's color back to the theme accent. The way I've been accomplishing this is to override the color again on the child, but then it doesn't change with the theme accent

It would be nice to have a way to set a components color to match the theme color no matter what.

With no color specified on the link, it will be gray, inherited from parent callout

<Callout.Root color="gray">
    <Callout.Icon>
      <InfoCircledIcon />
    </Callout.Icon>
    <Callout.Text>
      You will need <Link href="#">admin privileges</Link> to install and access
      this application.
    </Callout.Text>
  </Callout.Root>

We can override the link's color to violet, but it won't change with the theme

<Callout.Root color="gray">
    <Callout.Icon>
      <InfoCircledIcon />
    </Callout.Icon>
    <Callout.Text>
      You will need <Link color="violet" href="#">admin privileges</Link> to install and access
      this application.
    </Callout.Text>
  </Callout.Root>

Proposed idea to be able to 'reset' the link's color back to the theme accent

<Callout.Root color="gray">
    <Callout.Icon>
      <InfoCircledIcon />
    </Callout.Icon>
    <Callout.Text>
      You will need <Link color="accent" href="#">admin privileges</Link> to install and access
      this application.
    </Callout.Text>
  </Callout.Root>
@jd-carroll
Copy link

Sounds like a great addition 👍🏻

@vladmoroz
Copy link
Contributor

Please see #65

@vladmoroz vladmoroz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
@vladmoroz vladmoroz added duplicate This issue or pull request already exists request New feature or request labels Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants