This repository was archived by the owner on Jan 25, 2024. It is now read-only.
Releases: katalyst/react-composable-content
Releases · katalyst/react-composable-content
v1.0.4
Additions:
- Added storybook, run with
yarn storybook configprop is now optional, if no config is present the composition will allow all components in thecomponentsprop and create a single group namedmain- Draft mode is now opt-in with
draftMode: true - Added translation options via the
langprop - Added a
sectionifierhelper for JSON data that requires being formatted in to sections - Component
messagecan now be HTML - Conditional fields with the
conditionprop for fields - Styling enhancements
Fixes:
- Fixed issues with radio/checkbox collections
v1.0.3
Removals:
RichText,Asset,DateandColourfield types have been removed as they were Koi-specific fields, some of these could be looked at as new builtins later on
Additions:
- Icons are now an optional bundle - see below for more information
- Basic stylesheet is an optional CSS bundle - ideally moving toward a better system, eg. css-in-js later on, but for now this is a quick win and helps move towards building a demo
- Nicer warning when you have a config using an undefined component
- Added
onCompositionChangeprop to do something with the JSON data whenever the composition changes, eg. send data via ajax or re-render something
SVG Icons have been bundled as an optional inclusion:
import ComposableContent from 'react-composable-content';
import * as icons from 'react-composable-content/icons';
<ComposableContent
icons={icons}
/>Or if you prefer to specify which icons you want to include, or if you want to mix-and-match the builtin icons with your own, you can import specific icons:
import ComposableContent from 'react-composable-content';
import visible from 'react-composable-content/icons/visible.svg';
import myOtherIcon from './assets/my-other-icon.svg';
<ComposableContent
icons={{
visible,
myOtherIcon,
}}
/>All icons should be inline SVG code.
v1.0.2
Dependency changes
- Removed jQuery dependency
- Removed Ornament dependency
- Added parameterize as a dependency
Fixes
- Fixed close advanced settings button not working
- Fixed collapse all / reveal all
Breaking Configuration changes
- Renamed
component.nametocomponent.labelandcomponent.slugtocomponent.nameto be more consistent with field configuration - Renamed
allComposableTypesprop tocomponents - Removed need for
configprop to include all component templating, instead we can get that from thecomponentsprop - Advanced settings are now configurable as
advancedSettings
This makes config more like this:
config={{
main: ["text"]
}}
components={[
{
name: "text",
label: "Text",
fields: [{
name: "text_field",
label: "Text",
type: "text",
}]
}
]}
advancedSettings={[
{
name: "class",
label: "Class",
},{
name: "id",
label: "Id",
hint: "This can be used for anchoring purposes",
}
]}