-
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.
add beginnings of create price test page
- Loading branch information
Showing
3 changed files
with
107 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
const enTranslations = require('@shopify/polaris/locales/en.json'); | ||
const {AppProvider, Page, Card, Button} = require('@shopify/polaris'); | ||
const enTranslations = require("@shopify/polaris/locales/en.json"); | ||
const { | ||
AppProvider, | ||
Button, | ||
Card, | ||
EmptyState, | ||
Heading, | ||
Page, | ||
ResourceList | ||
} = require("@shopify/polaris"); | ||
|
||
exports.appProvider = AppProvider; | ||
exports.button = Button; | ||
exports.card = Card; | ||
exports.emptyState = EmptyState; | ||
exports.enTranslations = enTranslations; | ||
exports.appProvider = AppProvider | ||
exports.heading = Heading | ||
exports.page = Page; | ||
exports.card = Card; | ||
exports.button = Button | ||
exports.resourceList = ResourceList; |
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,17 +1,43 @@ | ||
module Shopify where | ||
|
||
import Prelude | ||
import Data.Nullable (Nullable) | ||
import Effect (Effect) | ||
import React.Basic (JSX, ReactComponent) | ||
|
||
type Action | ||
= { content :: String | ||
, onAction :: Effect Unit | ||
} | ||
|
||
foreign import data I18N :: Type | ||
|
||
foreign import enTranslations :: I18N | ||
|
||
foreign import appProvider :: ReactComponent { i18n :: I18N, children :: Array JSX } | ||
foreign import appProvider :: ReactComponent { i18n :: I18N, children :: JSX } | ||
|
||
foreign import page :: ReactComponent { title :: String, children :: Array JSX } | ||
foreign import page :: | ||
ReactComponent | ||
{ title :: String | ||
, subtitle :: Nullable String | ||
, children :: Array JSX | ||
, primaryAction :: Nullable Action | ||
} | ||
|
||
foreign import card :: ReactComponent { sectioned :: Boolean, children :: Array JSX } | ||
|
||
foreign import button :: ReactComponent { onClick :: Effect Unit, children :: Array JSX } | ||
|
||
foreign import emptyState :: | ||
ReactComponent | ||
{ heading :: String | ||
, action :: Action | ||
, image :: String | ||
, children :: Array JSX | ||
} | ||
|
||
data Item a = Item a | ||
|
||
foreign import resourceList :: forall a. ReactComponent { items :: Array a, renderItem :: a -> JSX } | ||
|
||
foreign import heading :: ReactComponent { element :: String, children :: String} |