-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b913336
commit 06bd818
Showing
34 changed files
with
636 additions
and
628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
apps/sfy-eu-blocks-app/admin-block-extension/src/components/FormSelect.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { | ||
OptionDescription, | ||
OptionGroupDescription, | ||
Select | ||
} from '@shopify/ui-extensions-react/admin'; | ||
import { TFormField } from 'feature-form'; | ||
import { useGlobalState } from 'feature-react/state'; | ||
|
||
export const FormSelect: React.FC<TProps> = (props) => { | ||
const { field, label, options, disabled, placeholder } = props; | ||
const fieldStatus = useGlobalState(field.status); | ||
const fieldValue = useGlobalState(field); | ||
|
||
return ( | ||
<Select | ||
label={label} | ||
name={field.key} | ||
onBlur={() => { | ||
field.blur(); | ||
}} | ||
value={fieldValue} | ||
options={options} | ||
onChange={(value) => { | ||
field.set(value, { | ||
additionalData: { | ||
background: false // Because its controlled form field | ||
} | ||
}); | ||
}} | ||
error={fieldStatus.type === 'INVALID' ? fieldStatus.errors[0]?.message : undefined} | ||
disabled={disabled} | ||
placeholder={placeholder} | ||
/> | ||
); | ||
}; | ||
|
||
interface TProps { | ||
label: string; | ||
field: TFormField<string>; | ||
options: (OptionDescription | OptionGroupDescription)[]; | ||
disabled?: boolean; | ||
placeholder?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
apps/sfy-eu-blocks-app/admin-block-extension/src/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export * from './BannerBlock'; | ||
export * from './EnergyLabelPreview'; | ||
export * from './FormSelect'; | ||
export * from './FormTextField'; | ||
export * from './LoadEnergyLabelSection'; | ||
export * from './UpdateEnergyLabelMetaFieldsSection'; |
2 changes: 1 addition & 1 deletion
2
apps/sfy-eu-blocks-app/admin-block-extension/src/environment/config/core-api.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const coreApiConfig = { | ||
baseUrl: 'https://exclusion-candles-holds-licence.trycloudflare.com' // TODO: Find way to sync url from api-core-node | ||
baseUrl: 'https://miles-collectibles-organised-deborah.trycloudflare.com' // TODO: Find way to sync url from api-core-node | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-app/checkout-ui-extension/src/CheckoutCartLineItem/environment/config/core-api.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const coreApiConfig = { | ||
baseUrl: 'https://exclusion-candles-holds-licence.trycloudflare.com' // TODO: Find way to sync url from api-core-node | ||
baseUrl: 'https://miles-collectibles-organised-deborah.trycloudflare.com' // TODO: Find way to sync url from api-core-node | ||
}; |
Oops, something went wrong.