Skip to content

Commit

Permalink
Merge pull request #508 from omnifed/507-feat-add-none-option-to-avat…
Browse files Browse the repository at this point in the history
…ar-gradient

feat(react): add none option to gradients in avatar
  • Loading branch information
caseybaggz authored Sep 18, 2024
2 parents c1ec1de + 9fce6be commit e0f3286
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/app/react/avatar/components/live-playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { gradientValues } from '@cerberus-design/panda-preset'
import { Avatar } from '@cerberus-design/react'

const api = {
gradient: builder.Enum('gradient', gradientValues),
gradient: builder.Enum('gradient', [...gradientValues, 'none']),
size: builder.Enum('size', [
'xs',
'sm',
Expand Down
5 changes: 4 additions & 1 deletion packages/panda-preset/src/recipes/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export const avatar: RecipeConfig<RecipeVariantRecord> = defineRecipe({
},

variants: {
gradient: createGradientVariants(),
gradient: {
...createGradientVariants(),
none: {},
},
size: {
xs: {
fontSize: 'xs',
Expand Down
1 change: 1 addition & 0 deletions tests/panda-preset/recipes/avatar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('avatar recipe', () => {
cerbGradient: 'red',
color: 'danger.text.static',
},
none: {},
})
})

Expand Down

0 comments on commit e0f3286

Please sign in to comment.