Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
🤖 Generated by Copilot at e52b705
This pull request introduces a new
CustomStyle
component inamis-core
that can insert custom CSS styles for AMIS components based on props. It also refactors several renderers inamis
andamis-editor
to use this component instead of injecting styles manually. Additionally, it adds a newcustomStyleClassPrefix
property to theRendererEnv
interface that can be used to customize the prefix of the generated CSS classes for custom styles.🤖 Generated by Copilot at e52b705
Why
How
🤖 Generated by Copilot at e52b705
CustomStyle
that can insert custom CSS styles based on thethemeCss
andclassNames
props (link)CustomStyle
component in theamis-core
index file (link, link)customStyleClassPrefix
to theRendererEnv
interface, which can be used to customize the prefix of the generated CSS classes for custom styles (link)weights
object in theformatStyle
function, to prevent errors when the object is undefined or null (link)CustomStyleClassName
that represents the shape of theclassNames
prop for theCustomStyle
component, and add a new parametercustomStyleClassPrefix
to theinsertCustomStyle
function, which can be used to prepend a custom prefix to the generated CSS classes (link)customStyleClassPrefix
to thevalue
variable in theinsertCustomStyle
function, if the prefix is defined (link)insertCustomStyle
with theCustomStyle
component in theAction
,InputImage
,InputNumber
,InputText
, andIcon
renderers, and pass theenv
prop from the parent component (link, link, link, link, link, link, link, link)env
prop to theInputNumber
andInputText
components, which can be used to pass the custom style class prefix to theCustomStyle
component (link, link)IconPlugin
component, to match the new prop name for the custom style (link)insertCustomStyle
for the label and description classes in theFormItemWrap
component, and replace them with theCustomStyle
component (link, link)