From fe3aa3d49de9766b2015e3210bcabf6df9a0db04 Mon Sep 17 00:00:00 2001 From: lynn Date: Sat, 14 Oct 2023 11:20:13 +0800 Subject: [PATCH] fix: typo --- README.md | 2 +- src/radial.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4efef6b..0aa7f84 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ interface LinearResult { ### `parseRadialGradient` ```ts -interface RadiusResult { +interface RadialResult { shape: 'circle' | 'ellipse' size: string repeating: boolean diff --git a/src/radial.ts b/src/radial.ts index bf2ad8b..a7ba997 100644 --- a/src/radial.ts +++ b/src/radial.ts @@ -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 @@ -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',