Skip to content

Commit

Permalink
Clarifying the documentation about Chip behaviour (mui-org#24611)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karim OURRAI committed Jan 27, 2021
1 parent c229cbe commit 1da69f6
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip-zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar for the Card Header.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/chip/chip.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"avatar": "The Avatar element to display.",
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If false, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable.",
"clickable": "If <code>true</code>, the chip will appear clickable, and will raise when pressed, even if the onClick prop is not defined. If <code>false</code>, the chip will not be clickable, even if onClick prop is defined. This can be used, for example, along with the component prop to indicate an anchor Chip is clickable. Note: this controls the UI and does not affect the onClick event.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"deleteIcon": "Override the default delete icon element. Shown only if <code>onDelete</code> is set.",
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/Chip/Chip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ export interface ChipTypeMap<P = {}, D extends React.ElementType = 'div'> {
/**
* If `true`, the chip will appear clickable, and will raise when pressed,
* even if the onClick prop is not defined.
* If false, the chip will not be clickable, even if onClick prop is defined.
* If `false`, the chip will not be clickable, even if onClick prop is defined.
* This can be used, for example,
* along with the component prop to indicate an anchor Chip is clickable.
* Note: this controls the UI and does not affect the onClick event.
*/
clickable?: boolean;
/**
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/Chip/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,10 @@ Chip.propTypes = {
/**
* If `true`, the chip will appear clickable, and will raise when pressed,
* even if the onClick prop is not defined.
* If false, the chip will not be clickable, even if onClick prop is defined.
* If `false`, the chip will not be clickable, even if onClick prop is defined.
* This can be used, for example,
* along with the component prop to indicate an anchor Chip is clickable.
* Note: this controls the UI and does not affect the onClick event.
*/
clickable: PropTypes.bool,
/**
Expand Down

0 comments on commit 1da69f6

Please sign in to comment.