Build JSON object for Slack Block Kit surfaces from JSX
MIT License
Published by yhatt 11 months ago
Published by yhatt over 1 year ago
<a>
tags have no longer been encoded by encodeURI()
implicitly, excluding some characters that have conflicted with Slack's mrkdwn format (#288, #289 by @nholden)For keeping to get the compatible output with v5, wrap the value of
href
attribute withencodeURI()
explicitly.<Mrkdwn> - <a href={'https://example.com/?regex=<([^/]+?)>'}>Link</a> + <a href={encodeURI('https://example.com/?regex=<([^/]+?)>')}>Link</a> </Mrkdwn>
VoidFunctionComponent
, VFC
, JSXSlack.FunctionalComponent
, JSXSlack.VoidFunctionalComponent
, and JSXSlack.Props
(#293)Published by yhatt over 2 years ago
Dropped EoL Node.js 12 support (#271)
Removed implicit children
prop from FunctionComponent
to make compatible types with React 18 (Use PropsWithChildren<P>
to include children
prop) (#270)
-JSXSlack.FunctionComponent<P>
+JSXSlack.FunctionComponent<JSXSlack.PropsWithChildren<P>>
-JSXSlack.FunctionComponent
+JSXSlack.FunctionComponent<JSXSlack.PropsWithChildren<{}>>
VoidFunctionComponent
, VFC
, FunctionalComponent
, VoidFunctionalComponent
, and Props
type (#270)
Depreacted | Replace to |
---|---|
VoidFunctionComponent / VFC
|
FunctionComponent / FC
|
FunctionalComponent |
FunctionComponent / FC
|
VoidFunctionalComponent |
FunctionComponent / FC
|
Props<P> |
P |
Published by yhatt almost 3 years ago
Published by yhatt almost 3 years ago
<blockquote>
(GHSA-55xv-f85c-248q)