Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Aug 8, 2024
1 parent 2a9b682 commit d95d38d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 361 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@commitlint/cli": "19.4.0",
"@commitlint/config-conventional": "19.2.2",
"@hyperse/eslint-config-hyperse": "^1.1.0",
"@hyperse/vitest-coverage-reporter": "^1.0.2",
"@hyperse/vitest-coverage-reporter": "^1.0.3",
"@types/node": "^22.1.0",
"@vitest/coverage-istanbul": "^2.0.5",
"cheerio": "^1.0.0-rc.12",
Expand Down
16 changes: 8 additions & 8 deletions website/docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Here are some examples of string input:

### Hex, 8-digit (RGBA) Hex

```tsx
```jsx
<MuiColorInput value="#000" />
<MuiColorInput value="000" />
<MuiColorInput value="#369C" />
Expand All @@ -34,7 +34,7 @@ Here are some examples of string input:

### RGB, RGBA

```tsx
```jsx
<MuiColorInput value="rgb (255, 0, 0)" />
<MuiColorInput value="rgb 255 0 0" />
<MuiColorInput value="rgba (255, 0, 0, .5)" />
Expand All @@ -43,7 +43,7 @@ Here are some examples of string input:

### HSL, HSLA

```tsx
```jsx
<MuiColorInput value="hsl(0, 100%, 50%)" />
<MuiColorInput value="hsla(0, 100%, 50%, .5)" />
<MuiColorInput value="hsl 0 1.0 0.5" />
Expand All @@ -52,7 +52,7 @@ Here are some examples of string input:

### HSV, HSVA

```tsx
```jsx
<MuiColorInput value="hsv(0, 100%, 50%)" />
<MuiColorInput value="hsva(0, 100%, 50%, .5)" />
<MuiColorInput value="hsv (0 100% 100%)" />
Expand All @@ -74,7 +74,7 @@ The callback gives you **2 parameters**:

Example:

```tsx
```jsx
const handleChange = (color, colors) => {
/**
color: "#ffffff"
Expand All @@ -101,7 +101,7 @@ The format to use for the color [value](#value). The first parameter of `onChang

**Available formats**: `hex`, `hex8`, `hsl`, `hsv` and `rgb`.

```tsx
```jsx
<MuiColorInput format="hex" />
<MuiColorInput format="hex8" />
<MuiColorInput format="rgb" />
Expand All @@ -117,7 +117,7 @@ The format to use for the color [value](#value). The first parameter of `onChang

A fallback color [value](#value) in case the user updates the input with an invalid color value.

```tsx
```jsx
<MuiColorInput fallbackValue="#ffffff" />
<MuiColorInput fallbackValue="#ffffffff" />
<MuiColorInput fallbackValue="hsv(0, 0%, 100%)" />
Expand All @@ -133,6 +133,6 @@ A fallback color [value](#value) in case the user updates the input with an inva

Whether to show input controls for a color’s alpha channel.

```tsx
```jsx
<MuiColorInput isAlphaHidden />
```
6 changes: 3 additions & 3 deletions website/docs/react-hook-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Here an example if you want to plug `MuiColorInput` to your form using [React Hook Form](https://react-hook-form.com/).

```tsx
```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import Button from '@mui/material/Button';
import { MuiColorInput, matchIsValidColor } from 'mui-color-input';
import { Controller, useForm } from 'react-hook-form';
import { matchIsValidColor,MuiColorInput } from 'mui-color-input';
import Button from '@mui/material/Button';

const App = () => {
const { control, handleSubmit } = useForm({
Expand Down
4 changes: 2 additions & 2 deletions website/docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This package is written in **TypeScript**. So you don't need to create your own

**Nota bene**: Props are defined within the `MuiColorInputProps` interface.

```tsx
```jsx
import React from 'react';
import {
MuiColorInput,
MuiColorInputValue,
MuiColorInputColors,
MuiColorInputFormat,
MuiColorInputValue,
} from 'mui-color-input';

const MyComponent = () => {
Expand Down
Loading

0 comments on commit d95d38d

Please sign in to comment.