Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function BathroomCabinet2(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function ConferenceRoom(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Door2(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Hairdresser1(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function RecordPlayer3(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Toilet2(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function UserPolice2(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
export default function FilledDiscount(props: NucleoIconProps) {
|
||||
const { fill, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Bouquet(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Discount22(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function BowlingPins(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function PalmTree2(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Chips3(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NucleoIconProps } from '../../icon'
|
||||
import { getNucleoIconProps } from '../utils'
|
||||
import type { NucleoIconProps } from "../../icon"
|
||||
import { getNucleoIconProps } from "../utils"
|
||||
|
||||
function Popcorn2(props: NucleoIconProps) {
|
||||
const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
export const colorVariants = {
|
||||
'Icon/Default': 'var(--Icon-Default)',
|
||||
'Icon/Intense': 'var(--Icon-Intense)',
|
||||
'Icon/Accent': 'var(--Icon-Accent)',
|
||||
'Icon/Inverted': 'var(--Icon-Inverted)',
|
||||
'Icon/Interactive/Default': 'var(--Icon-Interactive-Default)',
|
||||
'Icon/Interactive/Secondary': 'var(--Icon-Interactive-Secondary)',
|
||||
'Icon/Interactive/Accent': 'var(--Icon-Interactive-Accent)',
|
||||
'Icon/Interactive/Disabled': 'var(--Icon-Interactive-Disabled)',
|
||||
'Icon/Interactive/Placeholder': 'var(--Icon-Interactive-Placeholder)',
|
||||
'Icon/Feedback/Information': 'var(--Icon-Feedback-Information)',
|
||||
'Icon/Feedback/Success': 'var(--Icon-Feedback-Success)',
|
||||
'Icon/Feedback/Warning': 'var(--Icon-Feedback-Warning)',
|
||||
'Icon/Feedback/Error': 'var(--Icon-Feedback-Error)',
|
||||
'Icon/Feedback/Neutral': 'var(--Icon-Feedback-Neutral)',
|
||||
CurrentColor: 'currentColor',
|
||||
"Icon/Default": "var(--Icon-Default)",
|
||||
"Icon/Intense": "var(--Icon-Intense)",
|
||||
"Icon/Accent": "var(--Icon-Accent)",
|
||||
"Icon/Inverted": "var(--Icon-Inverted)",
|
||||
"Icon/Interactive/Default": "var(--Icon-Interactive-Default)",
|
||||
"Icon/Interactive/Secondary": "var(--Icon-Interactive-Secondary)",
|
||||
"Icon/Interactive/Accent": "var(--Icon-Interactive-Accent)",
|
||||
"Icon/Interactive/Disabled": "var(--Icon-Interactive-Disabled)",
|
||||
"Icon/Interactive/Placeholder": "var(--Icon-Interactive-Placeholder)",
|
||||
"Icon/Feedback/Information": "var(--Icon-Feedback-Information)",
|
||||
"Icon/Feedback/Success": "var(--Icon-Feedback-Success)",
|
||||
"Icon/Feedback/Warning": "var(--Icon-Feedback-Warning)",
|
||||
"Icon/Feedback/Error": "var(--Icon-Feedback-Error)",
|
||||
"Icon/Feedback/Neutral": "var(--Icon-Feedback-Neutral)",
|
||||
CurrentColor: "currentColor",
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { NucleoIconProps } from '../icon'
|
||||
import { getIconAriaProps } from '../utils'
|
||||
import { colorVariants } from './colorVariants'
|
||||
import { NucleoIconProps } from "../icon"
|
||||
import { getIconAriaProps } from "../utils"
|
||||
import { colorVariants } from "./colorVariants"
|
||||
|
||||
export function getNucleoIconProps(props: NucleoIconProps) {
|
||||
const fill = props.color ? colorVariants[props.color] : 'currentColor'
|
||||
const fill = props.color ? colorVariants[props.color] : "currentColor"
|
||||
const strokeWidth = props.strokeWidth || 2
|
||||
const width = props.size || '1em'
|
||||
const height = props.size || '1em'
|
||||
const width = props.size || "1em"
|
||||
const height = props.size || "1em"
|
||||
const ariaProps = getIconAriaProps(props)
|
||||
|
||||
return { fill, strokeWidth, width, height, ...ariaProps }
|
||||
|
||||
Reference in New Issue
Block a user