Skip to content

Commit

Permalink
fix: remove console info (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt authored Sep 7, 2024
1 parent f46e297 commit c7df68f
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 119 deletions.
6 changes: 0 additions & 6 deletions src/components/chart-elements/AreaChart/AreaChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ const AreaChart = React.forwardRef<HTMLDivElement, AreaChartProps>((props, ref)
}
setActiveDot(undefined);
}

if (process.env.NODE_ENV === "development") {
console.info(
"The AreaChart is also available as a copy-and-paste component. Visit https://tremor.so/docs/visualizations/area-chart (This is only shown in development)",
);
}
return (
<div ref={ref} className={tremorTwMerge("w-full h-80", className)} {...other}>
<ResponsiveContainer className="h-full w-full">
Expand Down
5 changes: 0 additions & 5 deletions src/components/chart-elements/BarChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
setActiveBar(undefined);
}
const yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
if (process.env.NODE_ENV === "development") {
console.info(
"The BarChart is also available as a copy-and-paste component. Visit https://tremor.so/docs/visualizations/bar-chart (This is only shown in development)",
);
}
return (
<div ref={ref} className={tremorTwMerge("w-full h-80", className)} {...other}>
<ResponsiveContainer className="h-full w-full">
Expand Down
6 changes: 0 additions & 6 deletions src/components/chart-elements/DonutChart/DonutChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ const DonutChart = React.forwardRef<HTMLDivElement, DonutChartProps>((props, ref
}
}, [activeIndex]);

if (process.env.NODE_ENV === "development") {
console.info(
"The DonutChart is also available as a copy-and-paste component. Visit https://tremor.so/docs/visualizations/donut-chart (This is only shown in development)",
);
}

return (
<div ref={ref} className={tremorTwMerge("w-full h-40", className)} {...other}>
<ResponsiveContainer className="h-full w-full">
Expand Down
6 changes: 0 additions & 6 deletions src/components/chart-elements/LineChart/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ const LineChart = React.forwardRef<HTMLDivElement, LineChartProps>((props, ref)
setActiveDot(undefined);
}

if (process.env.NODE_ENV === "development") {
console.info(
"The LineChart is also available as a copy-and-paste component. Visit https://tremor.so/docs/visualizations/line-chart (This is only shown in development)",
);
}

return (
<div ref={ref} className={tremorTwMerge("w-full h-80", className)} {...other}>
<ResponsiveContainer className="h-full w-full">
Expand Down
6 changes: 0 additions & 6 deletions src/components/icon-elements/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>((props, ref) => {

const { tooltipProps, getReferenceProps } = useTooltip();

if (process.env.NODE_ENV === "development") {
console.info(
"The Badge is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/badge (This is only shown in development)",
);
}

return (
<span
ref={mergeRefs([ref, tooltipProps.refs.setReference])}
Expand Down
6 changes: 0 additions & 6 deletions src/components/input-elements/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) =>
toggleTransition(loading);
}, [loading]);

if (process.env.NODE_ENV === "development") {
console.info(
"The Button is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/button (This is only shown in development)",
);
}

return (
// eslint-disable-next-line react/button-has-type
<button
Expand Down
5 changes: 0 additions & 5 deletions src/components/input-elements/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ function Calendar<T extends DayPickerSingleProps | DayPickerRangeProps>({
weekStartsOn = 0,
...other
}: T & { enableYearNavigation: boolean }) {
if (process.env.NODE_ENV === "development") {
console.info(
"The Calendar is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/calendar (This is only shown in development)",
);
}
return (
<DayPicker
showOutsideDays={true}
Expand Down
6 changes: 0 additions & 6 deletions src/components/input-elements/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ const DatePicker = React.forwardRef<HTMLDivElement, DatePickerProps>((props, ref
setSelectedValue(undefined);
};

if (process.env.NODE_ENV === "development") {
console.info(
"The DatePicker is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/date-picker (This is only shown in development)",
);
}

return (
<Popover
ref={ref}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ const DateRangePicker = React.forwardRef<HTMLDivElement, DateRangePickerProps>((
setSelectedValue({});
};

if (process.env.NODE_ENV === "development") {
console.info(
"The DateRangePicker is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/date-range-picker (This is only shown in development)",
);
}

return (
<div
ref={ref}
Expand Down
6 changes: 0 additions & 6 deletions src/components/input-elements/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ const Select = React.forwardRef<HTMLInputElement, SelectProps>((props, ref) => {
onValueChange?.("");
};

if (process.env.NODE_ENV === "development") {
console.info(
"The Select is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/select (This is only shown in development)",
);
}

return (
<div
className={tremorTwMerge(
Expand Down
6 changes: 0 additions & 6 deletions src/components/input-elements/Switch/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ const Switch = React.forwardRef<HTMLDivElement, SwitchProps>((props, ref) => {
const delay = 300;
const { tooltipProps, getReferenceProps } = useTooltip(delay);

if (process.env.NODE_ENV === "development") {
console.info(
"The Switch is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/switch (This is only shown in development)",
);
}

return (
<div className="flex flex-row items-center justify-start">
<Tooltip text={tooltip} {...tooltipProps} />
Expand Down
5 changes: 0 additions & 5 deletions src/components/input-elements/Tabs/TabGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export interface TabGroupProps extends React.HTMLAttributes<HTMLDivElement> {

const TabGroup = React.forwardRef<HTMLDivElement, TabGroupProps>((props, ref) => {
const { defaultIndex, index, onIndexChange, children, className, ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The Tab is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/tabs (This is only shown in development)",
);
}
return (
<Tab.Group
as="div"
Expand Down
5 changes: 0 additions & 5 deletions src/components/input-elements/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ const makeTextInputClassName = makeClassName("TextInput");

const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>((props, ref) => {
const { type = "text", ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The TextInput is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/input (This is only shown in development)",
);
}
return <BaseInput ref={ref} type={type} makeInputClassName={makeTextInputClassName} {...other} />;
});

Expand Down
5 changes: 0 additions & 5 deletions src/components/input-elements/Textarea/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, re
textAreaHTMLRef.style.height = scrollHeight + "px";
}
}, [autoHeight, inputRef, val]);
if (process.env.NODE_ENV === "development") {
console.info(
"The Textarea is also available as a copy-and-paste component. Visit https://tremor.so/docs/inputs/textarea (This is only shown in development)",
);
}
return (
<>
<textarea
Expand Down
5 changes: 0 additions & 5 deletions src/components/layout-elements/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ const Accordion = React.forwardRef<HTMLDivElement, AccordionProps>((props, ref)

const rootStyles =
useContext(RootStylesContext) ?? tremorTwMerge("rounded-tremor-default border");
if (process.env.NODE_ENV === "development") {
console.info(
"The Accordion is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/accordion (This is only shown in development)",
);
}
return (
<Disclosure
as="div"
Expand Down
5 changes: 0 additions & 5 deletions src/components/layout-elements/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {

const Card = React.forwardRef<HTMLDivElement, CardProps>((props, ref) => {
const { decoration = "", decorationColor, children, className, ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The Card is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/card (This is only shown in development)",
);
}
return (
<div
ref={ref}
Expand Down
5 changes: 0 additions & 5 deletions src/components/layout-elements/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ export type DialogProps = React.HTMLAttributes<HTMLDivElement> & {

const Dialog = React.forwardRef<HTMLDivElement, DialogProps>((props, ref) => {
const { children, className, ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The Dialog is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/dialog (This is only shown in development)",
);
}
return (
<Transition as={React.Fragment} appear show={props.open}>
<HeadlessuiDialog
Expand Down
5 changes: 0 additions & 5 deletions src/components/layout-elements/Divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const makeDividerClassName = makeClassName("Divider");
const Divider = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
(props, ref) => {
const { className, children, ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The Divider is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/divider (This is only shown in development)",
);
}
return (
<div
ref={ref}
Expand Down
5 changes: 0 additions & 5 deletions src/components/list-elements/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const makeTableClassName = makeClassName("Table");
const Table = React.forwardRef<HTMLTableElement, React.TableHTMLAttributes<HTMLTableElement>>(
(props, ref) => {
const { children, className, ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The Table is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/table (This is only shown in development)",
);
}

return (
<div className={tremorTwMerge(makeTableClassName("root"), "overflow-auto", className)}>
Expand Down
5 changes: 0 additions & 5 deletions src/components/text-elements/Callout/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export interface CalloutProps extends React.HTMLAttributes<HTMLDivElement> {

const Callout = React.forwardRef<HTMLDivElement, CalloutProps>((props, ref) => {
const { title, icon, color, className, children, ...other } = props;
if (process.env.NODE_ENV === "development") {
console.info(
"The Callout is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/callout (This is only shown in development)",
);
}
const Icon = icon;
return (
<div
Expand Down
5 changes: 0 additions & 5 deletions src/components/util-elements/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ export interface TooltipProps {
}

const Tooltip = ({ text, open, x, y, refs, strategy, getFloatingProps }: TooltipProps) => {
if (process.env.NODE_ENV === "development") {
console.info(
"The Tooltip is also available as a copy-and-paste component. Visit https://tremor.so/docs/ui/tooltip (This is only shown in development)",
);
}
return open && text ? (
<div
className={tremorTwMerge(
Expand Down
5 changes: 0 additions & 5 deletions src/components/vis-elements/BarList/BarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ function BarListInner<T>(props: BarListProps<T>, ref: React.ForwardedRef<HTMLDiv
}, [sortedData]);

const rowHeight = "h-8";
if (process.env.NODE_ENV === "development") {
console.info(
"The BarList is also available as a copy-and-paste component. Visit https://tremor.so/docs/visualizations/barlist (This is only shown in development)",
);
}

return (
<div
Expand Down

0 comments on commit c7df68f

Please sign in to comment.