The American Express Design System provides a unified language for designing American Express websites and experiences. The design system provides design resources that match our coded components and are aligned with the American Express brand. Included are colors, components, icons and glyphs, type styles, and graphic assets to get you up and running quickly.
On this page
Converts a v6 ContinuousLinearTracker component to a v7 ContinuousLinearTracker component.
label prop to labelOverrides.getScreenReaderLabel.label prop, which is deprecated. Use the labelOverrides.getScreenReaderLabel prop instead.getProgressBarLabel prop, which is deprecated. Use the labelOverrides.getScreenReaderLabel prop instead.text prop, which is deprecated. Use the labelOverrides.getScreenReaderValueText prop instead.glyph prop, which is deprecated.theme prop to the className prop. If it cannot, deletes the theme prop.For example:
import { ContinuousLinearTracker } from '@americanexpress/dls-react6';
export default function Page() {
return (
<ContinuousLinearTracker
label="Miles"
glyph={glyph}
text={text}
getProgressBarLabel={getProgressBarLabel}
theme={{ color: 'red' }}
{...otherProps}
/>
);
}
Transforms into:
import { ContinuousLinearTracker } from '@americanexpress/dls-react';
export default function Page() {
return (
<ContinuousLinearTracker
{...otherProps}
labelOverrides={{
getScreenReaderLabel: (min, max) => {
return `Miles from ${min} to ${max}`;
},
}}
/>
);
}
The label and getProgressBarLabel props have been removed in favor of labelOverrides.getScreenReaderLabel: (min: number, max: number) => string
The text prop has been removed in favor of labelOverrides.getScreenReaderValueText: (currentValue: number) => string
Connect with the DLS Team on Slack or by email.
Check out additional resources.