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