├── .gitignore ├── README.md ├── components ├── Callout.js ├── DocSearch.js ├── Logo.js ├── Tags.js └── Video.js ├── next.config.js ├── package.json ├── pages ├── _app.js ├── _document.js ├── api-reference │ ├── ComponentStructure.excalidraw │ ├── components │ │ ├── admin.mdx │ │ ├── app-settings.mdx │ │ ├── editor.mdx │ │ ├── login.mdx │ │ ├── meta.json │ │ ├── page-viewer.mdx │ │ ├── playground.mdx │ │ └── react-bricks.mdx │ ├── hooks │ │ ├── meta.json │ │ ├── use-admin-context.mdx │ │ ├── use-auth.mdx │ │ ├── use-page-public.mdx │ │ ├── use-page-values.mdx │ │ ├── use-pages-public.mdx │ │ ├── use-react-bricks-context.mdx │ │ ├── use-tags-public.mdx │ │ └── use-visual-edit.mdx │ ├── introduction │ │ ├── components-structure.mdx │ │ ├── introduction.mdx │ │ └── meta.json │ ├── meta.json │ ├── types │ │ ├── enums.mdx │ │ ├── interfaces.mdx │ │ ├── meta.json │ │ └── types.mdx │ ├── utilities │ │ ├── block-plugin-constructor.mdx │ │ ├── clean-page.mdx │ │ ├── fetch-page.mdx │ │ ├── fetch-pages.mdx │ │ ├── fetch-tags.mdx │ │ ├── get-page-plain-text.mdx │ │ ├── mark-plugin-constructor.mdx │ │ ├── meta.json │ │ ├── plain.mdx │ │ └── uuid.mdx.old │ └── visual-components │ │ ├── file.mdx │ │ ├── image.mdx │ │ ├── link.mdx │ │ ├── meta.json │ │ ├── repeater.mdx │ │ ├── rich-text-ext.mdx │ │ ├── rich-text.mdx │ │ └── text.mdx ├── docs │ ├── admin-dashboard │ │ ├── app-settings.mdx │ │ ├── click-to-edit.mdx │ │ ├── editor.mdx │ │ ├── i18n.mdx │ │ ├── meta.json │ │ ├── overview.mdx │ │ ├── pages.mdx │ │ ├── playground.mdx │ │ └── user-roles.mdx │ ├── bricks │ │ ├── access-page-meta.mdx │ │ ├── create-visual-editing.mdx │ │ ├── external-content.mdx │ │ ├── meta.json │ │ ├── schema.mdx │ │ ├── side-edit-props.mdx │ │ ├── styling.mdx │ │ ├── visual-edit.mdx │ │ └── what-is-a-brick.mdx │ ├── configuration │ │ ├── configuration.mdx │ │ ├── custom-fields.mdx │ │ ├── meta.json │ │ └── page-types.mdx │ ├── deploy │ │ ├── how-to-deploy.mdx │ │ └── meta.json │ ├── getting-started │ │ ├── cli.mdx │ │ ├── introduction.mdx.old │ │ ├── learning-resources.mdx │ │ ├── meta.json │ │ ├── react-bricks-dashboard.mdx │ │ └── starter-projects.mdx │ ├── internationalization │ │ ├── meta.json │ │ ├── nextjs-i18-rounting.mdx │ │ └── page-and-queries.mdx │ ├── meta.json │ ├── nested-blocks │ │ ├── get-default-props.mdx │ │ ├── meta.json │ │ ├── overview.mdx │ │ ├── repeated-bricks.mdx │ │ └── repeater-items.mdx │ └── release-notes │ │ ├── meta.json │ │ ├── react-bricks-v2.mdx │ │ ├── react-bricks-v3.mdx │ │ ├── react-bricks-v31.mdx │ │ ├── upgrade-guide-v1-v2.mdx │ │ └── upgrade-guide-v2-v3.mdx ├── index.mdx └── meta.json ├── postcss.config.js ├── public ├── favicon-32x32.png ├── images │ ├── admin_app_settings.png │ ├── admin_editor.png │ ├── admin_editor_page.png │ ├── admin_playground.png │ ├── components-structure-admin.svg │ ├── components-structure-frontend.png │ ├── components-structure-frontend.svg │ ├── dashboard_app_keys.png │ ├── dashboard_app_keys_large.png │ ├── dashboard_app_settings.png │ ├── dashboard_app_settings_large.png │ ├── dashboard_app_users.png │ ├── dashboard_app_users_large.png │ ├── dashboard_apps.png │ ├── dashboard_apps_large.png │ ├── dashboard_user_settings.png │ ├── dashboard_user_settings_large.png │ ├── react-bricks-ui.ai │ └── react-bricks-ui.png ├── reactbricks-logo.svg └── videos │ ├── RB_CLI_opt.mp4 │ ├── click_to_edit.mp4 │ ├── i18n_delete.mp4 │ ├── i18n_settings.mp4 │ └── i18n_translation.mp4 ├── styles ├── globals.css ├── night-owl.css └── tailwind.css ├── tailwind.config.js ├── theme.config.js ├── utils └── gtag.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Bricks documentation 2 | 3 | This is the documentation website for [React Bricks](https://reactbricks.com). -------------------------------------------------------------------------------- /components/Callout.js: -------------------------------------------------------------------------------- 1 | const Callout = ({ children, background = 'bg-pink-50', emoji = '💡' }) => { 2 | return ( 3 |
98 | {props.children} 99 |
100 | )} 101 | placeholder="Type a text..." 102 | propName="text" 103 | plugins={[ 104 | bold, 105 | italic, 106 | unorderedList, 107 | link, 108 | { 109 | ...quote, 110 | renderElement: ({ children }) => ( 111 |70 | {props.children} 71 |
72 | )} 73 | placeholder="Type a text..." 74 | propName="text" 75 | allowedFeatures={[ 76 | types.RichTextFeatures.Bold, 77 | types.RichTextFeatures.Italic, 78 | types.RichTextFeatures.Code, 79 | types.RichTextFeatures.Highlight, 80 | types.RichTextFeatures.Link, 81 | types.RichTextFeatures.UnorderedList, 82 | types.RichTextFeatures.Quote, 83 | ]} 84 | renderBold={({ children, attributes }) => ( 85 | 86 | {children} 87 | 88 | )} 89 | /> 90 | ``` 91 | -------------------------------------------------------------------------------- /pages/api-reference/visual-components/text.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Text 3 | description: Visual editing component to edit plain text 4 | --- 5 | 6 | # Text 7 | 8 | The `Text` component allows the user to edit plain text. 9 | 10 | ## Properties 11 | 12 | Here's the Typescript interface for the props of the `Text` component: 13 | 14 | ```ts 15 | interface TextProps { 16 | propName: string 17 | renderBlock: React.FC 18 | placeholder: string 19 | multiline?: boolean 20 | } 21 | ``` 22 | 23 | ## Properties definition 24 | 25 | | Property | Definition | 26 | | ------------- | ------------------------------------------------------------------------------------------- | 27 | | `propName` | The prop of the Brick component corresponding to this text. | 28 | | `renderBlock` | A React functional component used to render the text.39 | {props.children} 40 |
41 | )} 42 | placeholder="Claim..." 43 | /> 44 | ``` 45 | -------------------------------------------------------------------------------- /pages/docs/admin-dashboard/app-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: App Settings 3 | description: All the settings of a Reacrt Bricks' App 4 | --- 5 | 6 | # App Settings 7 | 8 | Here the Admin user can set the App name, the languages for internationalization, the Deploy settings (staging and production build hooks). 9 | 10 | A user with Editor role sees only the "Deploy" button to trigger a rebuild. 11 | 12 | The App settings can also be set in the [React Bricks Dashboard](/docs/getting-started/react-bricks-dashboard) 13 | 14 |  15 | -------------------------------------------------------------------------------- /pages/docs/admin-dashboard/click-to-edit.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Click to edit 3 | description: Click on the live page to edit content 4 | --- 5 | 6 | import Video from '../../../components/Video' 7 | 8 | # Click to edit 9 | 10 | When you are logged in the Admin dashboard and you navigate the live website (which uses React Bricks' Viewer), you will see a small pencil icon that you can click to directly go to the Admin interface editing that page. 11 | 12 | 13 | 14 | If you have more than one language, you will go to the editing interface for that page in the currently displayed language. 15 | 16 | Via [React Bricks configuration's](../configuration/configuration) `clickToEditSide` you can choose in which corner the "click to edit" button should appear. 17 | -------------------------------------------------------------------------------- /pages/docs/admin-dashboard/editor.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: The Editor 3 | description: Where content creators can edit the content of website pages 4 | --- 5 | 6 | # The Editor 7 | 8 | This is where content creators ([Admin](user-roles) or [Editor](user-roles) users) can edit the content of the website pages. 9 | 10 |  11 | 12 | ## Left panel (Pages) 13 | 14 | In the left panel you see the Pages, organized by Page Type. 15 | Clicking on a Page you can edit the page content. 16 | 17 | ## Central panel (content editor) 18 | 19 | The central panel is used to: 20 | 21 | - Visul edit the content of a block (Text, Images) 22 | - Add / remove / sort blocks. 23 | 24 | ## Right panel (Page, Block, Item, Stories) 25 | 26 | The right panel has 3 tabs: 27 | 28 | - **Page**: where you can edit [page properties](pages), like Name, Slug, Meta attributes (title, description, featured image, author, tags), set the [status of the page](pages) (draft / published, locked / unlocked), delete the page. 29 | - **Block**: to edit the block properties, as defined in the Brick's [sideEditProps](/docs/bricks/side-edit-props) (for example background color, padding, etc.), add or remove repeater items (used in `