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

feat: Add theming support to input components #358

Closed
6 of 7 tasks
anicholls opened this issue Dec 9, 2019 · 2 comments
Closed
6 of 7 tasks

feat: Add theming support to input components #358

anicholls opened this issue Dec 9, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@anicholls
Copy link
Contributor

anicholls commented Dec 9, 2019

🚀 Feature Proposal

The framework for theming recently got merged (#272). We need to add support for it within our components. As a first step, we should use the theme object color values within every component. We can look at breakpoints as the followup.

Implementation

Simply extend the Themeable interface, and use the theme prop provided to our custom styled function to style things

import {styled, Themeable} from '@workday/canvas-kit-labs-react-core';

export interface MyComponentProps extends Themeable, React.HTMLAttributes<HTMLDivElement> {
  // Props
}

// ...

const Container = styled('div')<MyComponentProps>(
  ({theme}) => ({
    background: theme.palette.primary.main
  })
);

// ...

Note: We're going to start with just strong colors (focus outline, blue, red, green, yellow, etc.). We will tackle backgrounds, default borders, etc. in a future update.

Components

@anicholls anicholls added the enhancement New feature or request label Jan 6, 2020
@anicholls anicholls changed the title feat: Add theming support to components feat: Add theming support to input components Feb 3, 2020
@anicholls
Copy link
Contributor Author

Seems like #416 is required to remove the docs page for our theming and visual stories

@jpante
Copy link
Member

jpante commented May 11, 2020

See #570 for final themed component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants