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(ui): component theming #4883

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

dbanksdesign
Copy link
Contributor

@dbanksdesign dbanksdesign commented Jan 4, 2024

Description of changes

Splitting up this PR. First one just adds functionality. Next ones will add examples and docs.

Adding the ability to completely theme components (with any css property). This opens up a few critical use-cases:

  1. Being able to use the theme for customizing components where we don't have a design token (like box-shadow on a button)
  2. Split out theme files with createComponentTheme with Type-safety
  3. Ability to create custom components easily

Issue #, if available

Description of how you validated changes

Checklist

  • Have read the Pull Request Guidelines
  • PR description included
  • Relevant documentation is changed or added (and PR referenced)
  • yarn test passes and tests are updated/added
  • No side effects or sideEffects field updated

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dbanksdesign dbanksdesign requested a review from a team as a code owner January 4, 2024 06:26
Copy link

changeset-bot bot commented Jan 4, 2024

⚠️ No Changeset found

Latest commit: e0f8aa1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

/**
* [📖 Docs](https://ui.docs.amplify.aws/react/components/theme)
*/
export const Theme: ThemeType = Object.assign(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add {} here

@@ -13,6 +13,11 @@
"import": "./dist/esm/internal.mjs",
"require": "./dist/internal.js"
},
"./theme": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to server

Element
>;

const ThemePrimitive: Primitive<ThemeProps, 'div'> = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @experimental

@dbanksdesign dbanksdesign merged commit 5fa49fb into component-theming/main Apr 18, 2024
@dbanksdesign dbanksdesign deleted the component-theming/first branch April 18, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants