Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie1210 committed Oct 14, 2023
1 parent eaf855b commit fe3aa3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface LinearResult {

### `parseRadialGradient`
```ts
interface RadiusResult {
interface RadialResult {
shape: 'circle' | 'ellipse'
size: string
repeating: boolean
Expand Down
6 changes: 3 additions & 3 deletions src/radial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { resolveStops, split } from './utils'

export type RgExtentKeyword = 'closest-corner' | 'closest-side' | 'farthest-corner' | 'farthest-side'

export interface RadiusResult {
export interface RadialResult {
shape: 'circle' | 'ellipse'
repeating: boolean
size: string
Expand All @@ -14,11 +14,11 @@ export interface RadiusResult {
}>
}

export function parseRadialGradient(input: string): RadiusResult {
export function parseRadialGradient(input: string): RadialResult {
if (!/(repeating-)?radial-gradient/.test(input)) throw new SyntaxError(`could not find syntax for this item: ${input}`)

const [, repeating, props] = input.match(/(repeating-)?radial-gradient\((.+)\)/)
const result: RadiusResult = {
const result: RadialResult = {
shape: 'ellipse',
repeating: Boolean(repeating),
size: 'farthest-corner',
Expand Down

0 comments on commit fe3aa3d

Please sign in to comment.