Skip to content

Commit

Permalink
update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanrajpac committed Feb 18, 2024
1 parent 37bea97 commit 86cf94b
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 30 deletions.
2 changes: 1 addition & 1 deletion build/settings.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => 'abdad22b82f87072690b');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => '1848ecc99e698c191ee9');
19 changes: 19 additions & 0 deletions build/settings.css

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

2 changes: 1 addition & 1 deletion build/settings.css.map

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

21 changes: 5 additions & 16 deletions build/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,29 +143,21 @@ const FlagRow = ({
justify: 'flex-start',
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, {
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
style: {
width: 180
},
className: "mr-feature-flags-input",
ref: inputRef,
value: item.name,
onChange: value => handleFlagEdit(value, item.id)
})
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, {
style: {
marginTop: 7,
marginLeft: 40,
minWidth: 150
},
className: "mr-feature-flags-toggle",
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, {
checked: item.enabled,
disabled: !!errorMessage,
onChange: () => handleFlagToggle(item.id),
label: `Flag ${item.enabled ? 'enabled' : 'disabled'}`
})
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, {
style: {
marginLeft: 60
},
className: "mr-feature-flags-sdk",
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
variant: "secondary",
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Click to see SDK setting', 'mr-feature-flags'),
Expand All @@ -175,10 +167,7 @@ const FlagRow = ({
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('</> SDK', 'mr-feature-flags')
})
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, {
style: {
marginBottom: 6,
marginLeft: 50
},
className: "mr-feature-flags-delete",
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
icon: 'trash',
isDestructive: true,
Expand Down Expand Up @@ -353,7 +342,7 @@ __webpack_require__.r(__webpack_exports__);
})
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.FlexItem, {
style: {
marginLeft: 170
marginLeft: 160
},
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('SDK Settings', 'mr-feature-flags')
Expand Down
2 changes: 1 addition & 1 deletion build/settings.js.map

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions src/components/FlagRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,13 @@ const FlagRow = ({
<Flex justify={'flex-start'}>
<FlexItem>
<TextControl
style={{ width: 180 }}
className="mr-feature-flags-input"
ref={inputRef}
value={item.name}
onChange={(value) => handleFlagEdit(value, item.id)}
/>
</FlexItem>
<FlexItem
style={{
marginTop: 7,
marginLeft: 40,
minWidth: 150,
}}
>
<FlexItem className="mr-feature-flags-toggle">
<ToggleControl
checked={item.enabled}
disabled={!!errorMessage}
Expand All @@ -133,7 +127,7 @@ const FlagRow = ({
/>
</FlexItem>

<FlexItem style={{ marginLeft: 60 }}>
<FlexItem className="mr-feature-flags-sdk">
<Button
variant="secondary"
label={__(
Expand All @@ -147,7 +141,7 @@ const FlagRow = ({
{__('</> SDK', 'mr-feature-flags')}
</Button>
</FlexItem>
<FlexItem style={{ marginBottom: 6, marginLeft: 50 }}>
<FlexItem className="mr-feature-flags-delete">
<Button
icon={'trash'}
isDestructive
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function (): JSX.Element {
<FlexItem style={{ marginLeft: 160 }}>
<h4>{__('Status', 'mr-feature-flags')}</h4>
</FlexItem>
<FlexItem style={{ marginLeft: 170 }}>
<FlexItem style={{ marginLeft: 160 }}>
<h4>{__('SDK Settings', 'mr-feature-flags')}</h4>
</FlexItem>
<FlexItem style={{ marginLeft: 30 }}>
Expand Down
19 changes: 19 additions & 0 deletions src/styles/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,22 @@
position: relative;
right: 40px;
}

.mr-feature-flags-input {
width: 180px;
}

.mr-feature-flags-toggle {
margin-top: 7px;
margin-left: 40px;
min-width: 150px;
}

.mr-feature-flags-sdk {
margin-left: 80px;
}

.mr-feature-flags-delete {
margin-bottom: 6px;
margin-left: 50px;
}

0 comments on commit 86cf94b

Please sign in to comment.