Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmguo committed Jan 23, 2024
1 parent 115e282 commit 462ed32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions packages/libs/react-ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pattern will export multiple subcomponents to compose the compound component.
A simple example of a component that should use this pattern is the Grid
component.

```jsx
```tsx
<Grid>
<GridItem>{item1}</GridItem>
<GridItem>{item2}</GridItem>
Expand All @@ -49,15 +49,15 @@ more subcomponents would negatively affect DX.
> [here](https://bradfrost.com/blog/post/atomic-web-design/) and
> [here](https://atomicdesign.bradfrost.com/chapter-2/).
##### Button component as an example (Needs to be updated)
##### Button component as an example

One example of a component that we updated from the Composition to Configuration
approach was the `Button` component.

Previously when the `Button` was used with an icon, it needed to be composed
like this:

```jsx
```tsx
<Button.Root>
Label
<Button.Icon />
Expand All @@ -77,7 +77,7 @@ pattern of the other components, however in usage it caused confusion becuase:
Now, it has been updated with the configuration approach and can be used in the
following way:

```jsx
```tsx
<Button startIcon="someIcon" loading={false}>
Label
</Button>
Expand Down Expand Up @@ -234,13 +234,9 @@ any client component files:

Guidelines when styling with VE:

- Classnames should use camel-casing and always have `Class` suffix -
`containerClass`
- You should use `atoms` whenever possible since these are predefined utility
class. If a style value that you think is commonly used is not available as a
`atoms`, feel free to add it.
- If you want to create multiple variations of a components style, use variants.
Variants should have a `Variant` suffix - `colorVariant`

### Selectors

Expand Down
4 changes: 2 additions & 2 deletions packages/libs/react-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ utilities that align with the [Kadena Design System][3].

Example for importing and using components:

```ts
```tsx
import { Text } from '@kadena/react-ui';

export const Component = () => {
Expand Down Expand Up @@ -134,7 +134,7 @@ provider.
You can use "next-themes" to set this up in Next.js projects by wrapping
`Component` with the `ThemeProvider` in `__app.tsx`

```js
```tsx
import { darkThemeClass } from '@kadena/react-ui';
import { ThemeProvider } from 'next-themes';

Expand Down

0 comments on commit 462ed32

Please sign in to comment.