Skip to content

Input: contentBefore and contentAfter don't work with bundleIcons #26057

Description

@ling1726

Repro: https://codesandbox.io/s/mystifying-austin-02jpd4?file=/example.tsx

image

The specificity of the content styles in Input are more specific than the styles applied in bundled icons, the result is that both filled and regular icons are always visible

const useContentStyles = makeStyles({
base: {
boxSizing: 'border-box',
color: tokens.colorNeutralForeground3, // "icon color" in design spec
// special case styling for icons (most common case) to ensure they're centered vertically
'> svg': { display: 'block' },
},
disabled: {
color: tokens.colorNeutralForegroundDisabled,
},
// Ensure resizable icons show up with the proper font size
small: {
'> svg': { fontSize: '16px' },
},
medium: {
'> svg': { fontSize: '20px' },
},
large: {
'> svg': { fontSize: '24px' },
},
});

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions