Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
710b891
added the help behavior to the cell component of the bottomsheet.
jd-alexander Apr 15, 2021
b23e8dd
Passed the autoplay help prop to ToggleControl. Changed the order.
jd-alexander Apr 15, 2021
6e39f14
Added CHANGELOG entry for cell help change..
jd-alexander Apr 16, 2021
269de3a
Merge branch 'trunk' into rnmobile/bottomsheet-cell-help
jd-alexander Apr 16, 2021
47e14a4
Used platform specific help behavior for video block.
jd-alexander Apr 16, 2021
de6a0bf
Put Audio block's autoplay setting at the top of the panel.
jd-alexander Apr 16, 2021
8a9a0bc
Utilized sizing from SCSS Variables instead of hardcoding values.
jd-alexander Apr 16, 2021
8891800
Added PR number to the CHANGELOG entry.
jd-alexander Apr 16, 2021
330f509
added platform specific styling for cellHelpLabel
jd-alexander Apr 19, 2021
29b4393
Made autoplay label consistent across web and mobile.
jd-alexander Apr 20, 2021
23de048
Merge branch 'trunk' into rnmobile/bottomsheet-cell-help
jd-alexander May 12, 2021
0b4931b
added help support to cell's accessibility capabilities.
jd-alexander May 12, 2021
67ce0aa
added help support to switch cell accessibility capabilities
jd-alexander May 12, 2021
89dbc06
utilised cellProps.help instead of help so the props are passed down
jd-alexander May 12, 2021
89b8d8f
Merge branch 'trunk' into rnmobile/bottomsheet-cell-help
jd-alexander May 14, 2021
cf4eab0
Merge branch 'trunk' into rnmobile/bottomsheet-cell-help
jd-alexander May 14, 2021
500de81
Merge branch 'trunk' into rnmobile/bottomsheet-cell-help
jd-alexander May 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
utilised cellProps.help instead of help so the props are passed down
  • Loading branch information
jd-alexander committed May 12, 2021
commit 89dbc064237596596378cf63c436788026953822
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import { __, _x, sprintf } from '@wordpress/i18n';
import Cell from './cell';

export default function BottomSheetSwitchCell( props ) {
const { value, onValueChange, help, ...cellProps } = props;
const { value, onValueChange, ...cellProps } = props;

const onPress = () => {
onValueChange( ! value );
};

const getAccessibilityLabel = () => {
if ( isEmpty( help ) ) {
if ( isEmpty( cellProps.help ) ) {
return value
? sprintf(
/* translators: accessibility text. Switch setting ON state. %s: Switch title. */
Expand All @@ -38,13 +38,13 @@ export default function BottomSheetSwitchCell( props ) {
/* translators: accessibility text. Switch setting ON state. %1: Switch title, %2: switch help. */
_x( '%1$s, %2$s. On', 'switch control' ),
cellProps.label,
help
cellProps.help
)
: sprintf(
/* translators: accessibility text. Switch setting OFF state. %1: Switch title, %2: switch help. */
_x( '%1$s, %2$s. Off', 'switch control' ),
cellProps.label,
help
cellProps.help
);
};

Expand Down