File tree Expand file tree Collapse file tree
packages/dataviews/src/dataform-controls Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22 * WordPress dependencies
33 */
4- import { Button } from '@wordpress/components' ;
4+ import {
5+ __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper ,
6+ Button ,
7+ } from '@wordpress/components' ;
58import { useCallback , useState } from '@wordpress/element' ;
69import { __ } from '@wordpress/i18n' ;
710import { seen , unseen } from '@wordpress/icons' ;
@@ -34,17 +37,19 @@ export default function Password< Item >( {
3437 validity,
3538 type : isVisible ? 'text' : 'password' ,
3639 suffix : (
37- < Button
38- icon = { isVisible ? unseen : seen }
39- onClick = { toggleVisibility }
40- size = "small"
41- variant = "tertiary"
42- aria-label = {
43- isVisible
44- ? __ ( 'Hide password' )
45- : __ ( 'Show password' )
46- }
47- />
40+ < InputControlSuffixWrapper variant = "control" >
41+ < Button
42+ icon = { isVisible ? unseen : seen }
43+ onClick = { toggleVisibility }
44+ size = "small"
45+ variant = "tertiary"
46+ aria-label = {
47+ isVisible
48+ ? __ ( 'Hide password' )
49+ : __ ( 'Show password' )
50+ }
51+ />
52+ </ InputControlSuffixWrapper >
4853 ) ,
4954 } }
5055 />
You can’t perform that action at this time.
0 commit comments