@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
24 lines (20 loc) • 959 B
JavaScript
"use client";
const require_create_component = require('../../core/components/create-component.cjs');
const require_icon_button_style = require('./icon-button.style.cjs');
const require_button = require('./button.cjs');
//#region src/components/button/icon-button.tsx
const { PropsContext: IconButtonPropsContext, usePropsContext: useIconButtonPropsContext, withContext } = require_create_component.createComponent("icon-button", require_icon_button_style.iconButtonStyle);
/**
* `IconButton` is a component that displays an icon within a button.
*
* @see https://yamada-ui.com/docs/components/icon-button
*/
const IconButton = withContext(require_button.Button)(void 0, ({ children, icon,...rest }) => ({
children: icon || children,
...rest
}));
//#endregion
exports.IconButton = IconButton;
exports.IconButtonPropsContext = IconButtonPropsContext;
exports.useIconButtonPropsContext = useIconButtonPropsContext;
//# sourceMappingURL=icon-button.cjs.map