Skip to content

[feat]: Come with an API to style SVGs #804

Closed
@gu-stav

Description

@gu-stav

A clear and concise description of what the feature is

This is not fleshed out yet, but we should develop a solid API to theme SVGs in the DS. This could either mean to use currentColor inside of SVGs, to create a component API, which allows us to re-colorize SVG child elements.

It would address e.g. the following issues:

and allow us to get a common overwrite pattern mentioned below.

Why should this feature be included?

Because we can not set a color on Icons we have to repeat the following pattern a lot in the CMS:

const Chevron = styled(Box)`
  svg path {
    fill: ${({ theme }) => theme.colors.primary600};
  }
`;

Please provide an example for how this would work

not yet defined

Metadata

Metadata

Assignees

Labels

issue: enhancementIssue suggesting an enhancement to an existing feature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions