Repository URL to install this package:
|
Version:
1.2.19 ▾
|
@skava/modules
/
___dist
/
view-container
/
styles
/
styled-components
/
src
/
no-parser
/
stringifyRules.js
|
|---|
import { Interpolation } from '../types'
const stringifyRules = (
rules: Array<Interpolation>,
selector: string | any,
prefix: string | any
): Array<string> => [
rules.reduce(
(str: string, partial: Interpolation, index: number): string =>
str +
// NOTE: This is to not prefix keyframes with the animation name
((index > 0 || !prefix) && selector ? selector : '') +
(partial && Array.isArray(partial)
? partial.join('')
: partial.toString()),
''
),
]
export default stringifyRules