Skip to content

Commit cdddd54

Browse files
authored
Merge pull request #4204 from grommet/4141-card-misuses
Update the misuses section with Selector examples
2 parents 9d71849 + 283dd5c commit cdddd54

File tree

1 file changed

+1
-28
lines changed
  • aries-site/src/pages/components/card

1 file changed

+1
-28
lines changed

aries-site/src/pages/components/card/index.mdx

+1-28
Original file line numberDiff line numberDiff line change
@@ -133,34 +133,7 @@ When cards are presenting as a group, they should function as a list.
133133
## Misuses
134134

135135
- When data attributes across items needs to be analyzed, sorted, compared, and filtered, a card may not be the best tool. Instead, [DataTable](/components/datatable) may be more appropriate tool to meet these needs.
136-
- Cards should not be used as a control to filter data on the same screen. A button is the appropriate control to apply a filter. Alternatively, cards may be used to present summarized information and allow a user to navigate to a pre-filtered view of that information.
137-
138-
<BestPracticeGroup>
139-
<Example
140-
height={{ min: 'small' }}
141-
bestPractice={{
142-
type: 'do',
143-
message:
144-
'Style status filter buttons as default buttons when the buttons are placed on the same page as the data they will be filtering.',
145-
}}
146-
scale={0.4}
147-
width="100%"
148-
>
149-
<CardFilteringBestPractice />
150-
</Example>
151-
<Example
152-
height={{ min: 'small' }}
153-
bestPractice={{
154-
type: 'dont',
155-
message: `Don’t use a card to wrap a set of status filter buttons if clicking on one of those buttons will filter data that exists on the same page as that card. Cards should act as independent regions that do not affect surrounding content. However, placing these buttons in a card would be appropriate on a dashboard, where clicking on one of the status buttons would navigate to a different page that is filtered by the selected status.`,
156-
}}
157-
scale={0.4}
158-
width="100%"
159-
>
160-
<CardFilteringBestPractice bestPractice={false} />
161-
</Example>
162-
</BestPracticeGroup>
163-
136+
- Cards should not be used as controls to filter data directly on the same screen. Instead, the [Selector](templates/selector) component is the appropriate tool for filtering data sets.
164137
- A card should not be used to group complex content into a single container. A card is meant to be individual, presenting a single, summarized topic which cannot be divided.
165138

166139
<BestPracticeGroup>

0 commit comments

Comments
 (0)