I would like to know how to put the text "MyTitle" in argument of the environment and also to place it on the right?
\documentclass[12pt]{article}
\usepackage{lmodern}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\newcounter{mycounter}
\setlength{\parindent}{0pt}
\begin{document}
\tcbset{exercisebox/.style={enhanced,colback=white,colframe=green!65!black,
enlarge top by=10mm,
overlay={%
\path[fill=blue!65,line width=.4mm] (frame.north west)--++(17mm,0)coordinate(n2)--++(0,8mm)--++(-20mm,0) arc (-90:90:-4mm)--cycle;
\node at ([shift={(5mm,4mm)}]frame.north west){\color{white}{\textbf{\sffamily Exercise}}};
\path[fill=green!65!blue] ([xshift=.4mm]n2)--++(0,8mm)--++(7mm,0)--++(0,-8mm)--cycle;
\node at ([shift={(4mm,4mm)}]n2){\color{white}{\textbf{\sffamily \themycounter}}};
\node at ([shift={(18mm,4mm)}]n2){\itshape\textbf{\sffamily MyTitle}};
}}}
Before...
\begin{tcolorbox}[exercisebox,step=mycounter,label=one]
My exercise here...
\end{tcolorbox}
After...
\end{document}
Thank you !