QA skill as a checker
PlanCard.tsx
import { Button, Card } from '@ds/core';import { Icon } from '@ds/icons'; export function PlanCard({ plan, onRemove }) { return ( <div style={{ display: 'flex', gap: 12 }}> (fail) <Card elevated className="bg-white shadow-md"> (fail) <h3 style={{ color: '#1A73E8' }}>{plan.name}</h3> (fail) <Button variant="primary" onClick={onRemove}> <Icon name="trash-can" /> Remove (fail) </Button> </Card> </div> );}import { Button, Card, Heading, Stack } from '@ds/core'; (pass)import { Icon } from '@ds/icons'; export function PlanCard({ plan, onRemove }) { return ( <Stack direction="row" gap="m"> (pass) <Card variant="raised"> (pass) <Heading level={3} tone="brand">{plan.name}</Heading> (pass) <Button variant="primary" onClick={onRemove}> <Icon name="trash" /> Remove (pass) </Button> </Card> </Stack> (pass) );}- ImportsOnly imports from the packages.pass
- Forbidden HTMLLine 6: a raw <div> as the container.fail
- Hard-coded valuesLine 6: gap: 12 instead of a spacing step.fail
- TokensLine 8: a hex colour instead of a token.fail
- IconsLine 10: “trash-can” is not in the icon set.fail
- PropsLine 7: Card has no “elevated” prop.fail
- LayoutLine 6: hand-made flexbox instead of Stack.fail
- CSS entryLine 7: className overrides the component.fail
- Dark modeLines 7–8: bg-white and the hex colour ignore dark mode.fail
- AccessibilityThe button has a visible name.pass
- ImportsOnly imports from the packages.pass
- Forbidden HTMLStack instead of a raw <div>.pass
- Hard-coded valuesgap="m" comes from the scale.pass
- Tokenstone="brand" instead of a colour.pass
- Icons“trash” exists in the icon set.pass
- Propsvariant="raised" is a real prop.pass
- LayoutStack lays out the row.pass
- CSS entryNo className override.pass
- Dark modeAll colours through tokens, so both themes work.pass
- AccessibilityButton with a visible name, heading with a level.pass
Sample code written for this page, not taken from a product. Same task, same model: the difference is the skill.