Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .npmpackagejsonlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build
vendor
wordpress
routes
widgets
16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
"test/performance",
"test/storybook-playwright",
"test/unit",
"tools/*"
"tools/*",
"widgets/*"
]
}
10 changes: 10 additions & 0 deletions widgets/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "@wordpress/hello-world-widget",
"version": "1.0.0",
"private": true,
"dependencies": {
"@wordpress/icons": "file:../../packages/icons",
"@wordpress/ui": "file:../../packages/ui",
"clsx": "^2.1.1"
}
}
20 changes: 14 additions & 6 deletions widgets/hello-world/render.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
/**
* External dependencies
*/
import clsx from 'clsx';

/**
* WordPress dependencies
*/
import { Stack, Text } from '@wordpress/ui';

/**
* Internal dependencies
*/
import styles from './style.module.css';

export default function HelloWorld() {
return (
<Stack
align="center"
justify="center"
style={ {
height: '100%',
padding: 'var(--wpds-dimension-padding-2xl)',
backgroundColor: 'var(--wpds-color-bg-surface-brand)',
color: 'var(--wpds-color-fg-interactive-brand)',
} }
className={ clsx( styles.root ) }
>
<Text variant="heading-2xl">Hello World</Text>
</Stack>
Expand Down
6 changes: 6 additions & 0 deletions widgets/hello-world/style.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.root {
height: 100%;
padding: var(--wpds-dimension-padding-2xl);
background-color: var(--wpds-color-bg-surface-brand);
color: var(--wpds-color-fg-interactive-brand);
}
Loading