The idea is the same; using \tcbset
you can define a common style containing the settings that will be shared by your boxes:
\makeatletter
\tcbset{common/.style={
enhanced,
frame hidden, interior hidden, segmentation hidden,
coltitle=black,
fonttitle=\bfseries\rmfamily,
fontupper=\tiny,
title={#1},
overlay unbroken={\draw[gray,line width=1pt] (frame.north west) rectangle (frame.south east);
\draw[gray,line width=1pt] ([xshift=\kvtcb@lefttitle+\kvtcb@boxsep]interior.north west)--([xshift=-(\kvtcb@righttitle+\kvtcb@boxsep)]interior.north east);
\shade (frame.south west)--++(0,-1mm)--(frame.south)--cycle;
\shade (frame.south east)--++(0,-1mm)--(frame.south)--cycle;},
}
}
\newtcolorbox{myblock}[2][]{common={#2},#1}
\newtcbox{mybox}[2][]{common={#2},#1}
\makeatother
A complete example
\documentclass{beamer}
\usetheme{Madrid}
\usepackage{tcolorbox}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\tcbuselibrary{skins}
\makeatletter
\tcbset{common/.style={
enhanced,
frame hidden, interior hidden, segmentation hidden,
coltitle=black,
fonttitle=\bfseries\rmfamily,
fontupper=\tiny,
title={#1},
overlay unbroken={\draw[gray,line width=1pt] (frame.north west) rectangle (frame.south east);
\draw[gray,line width=1pt] ([xshift=\kvtcb@lefttitle+\kvtcb@boxsep]interior.north west)--([xshift=-(\kvtcb@righttitle+\kvtcb@boxsep)]interior.north east);
\shade (frame.south west)--++(0,-1mm)--(frame.south)--cycle;
\shade (frame.south east)--++(0,-1mm)--(frame.south)--cycle;},
}
}
\newtcolorbox{myblock}[2][]{common={#2},#1}
\newtcbox{mybox}[2][]{common={#2},#1}
\makeatother
\begin{document}
\begin{frame}{A nice box for beamer}
\begin{myblock}{test text}
test text
\end{myblock}
\mybox{Oups, this is a long title}{test text}
\mybox[left=0mm,right=1cm]{Oups}{test text}
\end{frame}
\end{document}
And, of course, since the styles are really TikZ styles, there's "inheritance":
\tcbset{
style1/.style={colback=cyan!10},
style2/.style={style1,colframe=orange},
style3/.style={style2,outer arc=0pt,arc=0pt
}
}
\newtcolorbox{myblockA}{style1}
\newtcolorbox{myblockB}{style2}
\newtcolorbox{myblockC}{style3}
Best Answer
Since you don't want numbering, nor anything special, you can simply use
\newtcolorbox
: