Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
WordPress UI Components
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
WordPress UI Components
Merge requests
!1
Main
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Main
main
into
just_for_review
Overview
18
Commits
14
Pipelines
10
Changes
14
Closed
Eryk Mika
requested to merge
main
into
just_for_review
4 months ago
Overview
17
Commits
14
Pipelines
10
Changes
14
0
0
Merge request reports
Compare
just_for_review
version 9
77f49f8c
4 months ago
version 8
65133353
4 months ago
version 7
ba565222
4 months ago
version 6
a4efbb0d
4 months ago
version 5
e40ab274
4 months ago
version 4
e6ecb8d7
4 months ago
version 3
1c6aed01
4 months ago
version 2
c9525161
4 months ago
version 1
a7ed0ea4
4 months ago
just_for_review (base)
and
latest version
latest version
76b25497
14 commits,
3 months ago
version 9
77f49f8c
13 commits,
4 months ago
version 8
65133353
10 commits,
4 months ago
version 7
ba565222
9 commits,
4 months ago
version 6
a4efbb0d
8 commits,
4 months ago
version 5
e40ab274
7 commits,
4 months ago
version 4
e6ecb8d7
6 commits,
4 months ago
version 3
1c6aed01
5 commits,
4 months ago
version 2
c9525161
4 commits,
4 months ago
version 1
a7ed0ea4
2 commits,
4 months ago
14 files
+
1076
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
14
src/AlignButtons/AlignButtons.jsx
0 → 100644
+
35
−
0
View file @ 76b25497
Edit in single-file editor
Open in Web IDE
import
{
Button
}
from
"
@wordpress/components
"
;
export
default
function
AlignButtons
({
label
,
onChange
})
{
const
handleChange
=
(
newAlignment
)
=>
{
if
(
onChange
)
{
onChange
(
newAlignment
);
}
}
return
(
<
div
className
=
'fi-field-wrapper'
>
<
div
className
=
'fi-field-label-wrapper'
>
<
span
className
=
'fi-field-label'
>
{
label
}
</
span
>
</
div
>
<
div
className
=
'fi-field-buttons-wrapper fi-alignbuttons-wrapper'
>
<
Button
icon
=
"editor-alignleft"
className
=
"has-dashicons"
onClick
=
{
()
=>
handleChange
(
'
left
'
)
}
/>
<
Button
icon
=
"editor-aligncenter"
className
=
"has-dashicons"
onClick
=
{
()
=>
handleChange
(
'
center
'
)
}
/>
<
Button
icon
=
"editor-alignright"
className
=
"has-dashicons"
onClick
=
{
()
=>
handleChange
(
'
right
'
)
}
/>
</
div
>
</
div
>
);
}
Loading