Button
Buttons are used as triggers for actions. They are used in forms, toolbars, dialog footers and as stand-alone action triggers.
Installation
yarn add @kalamazoo/button
Usage
Detailed docs and example usage can be found here.
A React component that is a base button.
Buttons are used as triggers for actions. They are used in forms, toolbars, dialog footers and as stand-alone action triggers.
yarn add @kalamazoo/button
Detailed docs and example usage can be found here.
[patch]30acc30979:
@kalamazoo/select has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.
[patch]35d2229b2a:
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
[patch]a2d0043716:
Updated version of analytics-next to fix potential incompatibilities with TS 3.6
[minor]66e147e6a1:
Adding an optional prop testId
that will set the attribute value data-testid
. It will help products to write better integration and end to end tests.
[minor]93022be303:
Align button and subtle button text colour with ADG guidelines (improved contrast)
[patch]67a3a1ee02:
Converts prop types to interfaces
[patch]097b696613:
Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports
[patch]ecca4d1dbb:
Upgraded Typescript to 3.3.x
[patch]abee1a5f4f:
Bumping internal dependency (memoize-one) to latest version (5.1.0). memoize-one@5.1.0 has full typescript support so it is recommended that typescript consumers use it also.
[patch]de35ce8c67:
Updates component maintainers
[patch]926b43142b:
Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.
Breaking changes
withAnalyticsForSumTypeProps
alias has been removed, please use withAnalyticsEvents
AnalyticsContextWrappedComp
alias has been removed, please use withAnalyticsContext
Breaking changes to TypeScript annotations
withAnalyticsEvents
now infers proptypes automatically, consumers no longer need to provide props as a generic type.withAnalyticsContext
now infers proptypes automatically, consumers no longer need to provide props as a generic type.WithAnalyticsEventProps
has been renamed to WithAnalyticsEventsProps
to match source codeCreateUIAnalyticsEventSignature
has been renamed to CreateUIAnalyticsEvent
to match source codeUIAnalyticsEventHandlerSignature
has been renamed to UIAnalyticsEventHandler
to match source codeAnalyticsEventsPayload
has been renamed to AnalyticsEventPayload
ObjectType
has been removed, please use Record<string, any>
or [key: string]: any
UIAnalyticsEventInterface
has been removed, please use UIAnalyticsEvent
AnalyticsEventInterface
has been removed, please use AnalyticsEvent
CreateAndFireEventFunction
removed and should now be inferred by TypeScriptAnalyticsEventUpdater
removed and should now be inferred by TypeScript[patch]688f2957ca:
Fixes various TypeScript errors which were previously failing silently
[minor]8fcbe23ec6:
Updated types for analytics-next and buttons to make them easier to consume
[patch]9f8ab1084b:
Consume analytics-next ts type definitions as an ambient declaration.
[patch]bbff8a7d87:
Fixes bug, missing version.json file
[patch]18dfac7332:
In this PR, we are:
[patch]d0db01b410:
TypeScript users of withAnalyticsEvents and withAnalyticsContext are now required to provide props as a generic type. This is so that TypeScript can correctly calculate the props and defaultProps of the returned component.
Before:
withAnalyticsEvents()(Button) as ComponentClass<Props>;
After:
withAnalyticsEvents<Props>()(Button);
[patch]29a1f158c1:
Use default react import in typescript files.
[patch]aaf9d37b31:
Move @types/react-router-dom to devDependencies
[patch]b0ef06c685:
[patch]2a2d2060ae:
[patch]754f83b6f0:
[major]7c17b35107:
[patch]e0e3fabf8e:
[patch]d3cad2622e:
[patch]0a4ccaafae:
[patch]3f28e6443c:
[major]1e826b2966:
Highlights
Breaking Changes:
See the upgrade guide for more details
[patch]f8d92ffc5e:
[patch]5e3ad7f751:
[patch]872b3b905a:
[patch]22ce87801e:
[patch]d13fad66df:
[patch]98e11001ff:
[patch]59d4ab031b:
[patch]1bcaa1b991:
[patch]90a14be594:
[major]9d5cc39394:
[minor]36929ef:
[patch]76a8f1c:
import '@kalamazoo/button/dist/es5/components/ButtonGroup'
[patch]8f89287:
[major]6998f11:
import '@kalamazoo/button/dist/cjs/components/ButtonGroup';
would need to be updated to import '@kalamazoo/button/dist/es5/components/ButtonGroup'
Updated dependencies bfac186:
[patch] Fix flow types da63331
[none] Updated dependencies da63331
autoFocus
to button, allowing button to be automatically focused on first render. bf36eb6